Docker build出现“The command ‘/bin/sh 您所在的位置:网站首页 docker full ubuntu image Docker build出现“The command ‘/bin/sh

Docker build出现“The command ‘/bin/sh

#Docker build出现“The command ‘/bin/sh | 来源: 网络整理| 查看: 265

最近在学习docker时,发现使用ubuntu构建镜像时,如果有apt-get install命令,老是出现以下错误:The command ‘/bin/sh -c apt-get install -y vim’ returned a non-zzero code: 100 查了一下,发现很多人都说是使用ubuntu原始的源在apt-get install下载新包时,可能因为网络问题导致出现此报错。尝试了一下换源,果然成功解决了问题,下面附上解决方法。

解决方法 # 原始命令 RUN apt-get install -y vim # 修改方法 RUN sed -i 's#http://archive.ubuntu.com/#http://mirrors.tuna.tsinghua.edu.cn/#' /etc/apt/sources.list; RUN apt-get update && apt-get install -y vim #或者这个都可以 RUN apt-get update --fix-missing && apt-get install -y vim --fix-missing


【本文地址】

公司简介

联系我们

今日新闻

    推荐新闻

    专题文章
      CopyRight 2018-2019 实验室设备网 版权所有